abstract class VoluntaryThieve$Action
{
  private final String name;
  private final int id;
  final VoluntaryThieve.Action.Steps steps;
  private VoluntaryThieve.Action.State actionDoneState;

  private VoluntaryThieve$Action(String paramString, int paramInt, long[] paramArrayOfLong)
  {
    this.id = paramInt;
    this.name = paramString;
    this.steps = new VoluntaryThieve.Action.Steps(paramArrayOfLong, null);
  }

  private VoluntaryThieve$Action(String paramString, int paramInt, long paramLong1, long paramLong2)
  {
    this(paramString, paramInt, new long[] { paramLong1, 0L, paramLong2 });
  }

  private String getName()
  {
    return this.name;
  }

  private int getId()
  {
    return this.id;
  }

  private VoluntaryThieve.Action.State doAction()
  {
    if (this.actionDoneState != null)
      return this.actionDoneState;
    if (!VoluntaryThieve.Action.Steps.access$100(this.steps))
      VoluntaryThieve.Action.Steps.access$200(this.steps);
    VoluntaryThieve.Action.State localState;
    switch (VoluntaryThieve.Action.Steps.access$300(this.steps)) {
    case 0:
      if ((localState = perform()) != VoluntaryThieve.Action.State.COMPLETED) break;
      VoluntaryThieve.Action.Steps.access$400(this.steps);
      return VoluntaryThieve.Action.State.PROGRESSING;
    case 1:
      if ((localState = confirm()) != VoluntaryThieve.Action.State.COMPLETED) break;
      VoluntaryThieve.Action.Steps.access$400(this.steps);
      return VoluntaryThieve.Action.State.PROGRESSING;
    case 2:
      if ((localState = finish()) != VoluntaryThieve.Action.State.COMPLETED) break;
      return this.actionDoneState = VoluntaryThieve.Action.State.COMPLETED;
    default:
      throw new AssertionError("Unsupported step: " + VoluntaryThieve.Action.Steps.access$300(this.steps));
    }

    return (localState == VoluntaryThieve.Action.State.FAILED) || (VoluntaryThieve.Action.Steps.access$500(this.steps)) ? (this.actionDoneState = VoluntaryThieve.Action.State.FAILED) : VoluntaryThieve.Action.State.PROGRESSING;
  }

  abstract VoluntaryThieve.Action.State perform();

  VoluntaryThieve.Action.State confirm()
  {
    return VoluntaryThieve.Action.State.COMPLETED;
  }

  abstract VoluntaryThieve.Action.State finish();
}